import request from '@/utils/request'

// 查询库房与上下级库房对照列表 (分页)
export function selectPageDrugVsSubordinate(query) {
  return request({
    url: '/drug/drugVsSubordinate/selectPage',
    method: 'get',
    params: query
  })
}

// 查询库房与上下级库房对照列表 (不分页)
export function listDrugVsSubordinate(query) {
  return request({
    url: '/drug/drugVsSubordinate/list',
    method: 'get',
    params: query
  })
}

// 根据库房id获取库房字典
export function getStorageDictBySelfStorage(query) {
  return request({
    url: '/drug/drugVsSubordinate/getStorageDictBySelfStorage',
    method: 'get',
    params: query
  })
}

// 查询库房与上下级库房对照详细
export function getDrugVsSubordinate(drugVsSubordinateId) {
  return request({
    url: '/drug/drugVsSubordinate/' + drugVsSubordinateId,
    method: 'get'
  })
}

// 新增库房与上下级库房对照
export function addDrugVsSubordinate(data) {
  return request({
    url: '/drug/drugVsSubordinate',
    method: 'post',
    data: data
  })
}

// 修改库房与上下级库房对照
export function updateDrugVsSubordinate(data) {
  return request({
    url: '/drug/drugVsSubordinate',
    method: 'put',
    data: data
  })
}

// 删除库房与上下级库房对照
export function delDrugVsSubordinate(drugVsSubordinateId) {
  return request({
    url: '/drug/drugVsSubordinate/' + drugVsSubordinateId,
    method: 'delete'
  })
}
